<template>
  <div>
    <el-table border :data="tableData.list" v-loading="loading" element-loading-text="加载中..."
              class="el-table-align-center">
      <el-table-column label="时间" prop="time" width="180">
        <template slot-scope="{row}">
          <div>{{row.time | toTime}}</div>
        </template>
      </el-table-column>
      <el-table-column prop="creator" label="操作人"></el-table-column>
      <el-table-column prop="operatorType" label="操作类别"></el-table-column>
      <el-table-column prop="content" label="操作项目">
        <template slot-scope="{row}">
          <el-tooltip effect="dark" :content="row.content" placement="top">
            <span class="text-nowrap">{{row.content}}</span>
          </el-tooltip>
        </template>
      </el-table-column>
      <el-table-column prop="ip" label="IP"></el-table-column>
    </el-table>
    <div class="pagination-container">
      <el-pagination background @size-change="gridSizeChange" @current-change="gridCurrentChange"
                     :current-page="filters.page" :page-sizes="gridPageSize" :page-size="filters.size"
                     :layout="gridLayout" :total="tableData.total">
      </el-pagination>
    </div>
  </div>
</template>

<script>
  import {getMemberOperatorLogs} from "@/services/api/member";
  import {grid} from "@/build"

  export default {
    name: "user-operate-table-logs",
    mixins: [grid],
    data() {
      return {
        tableData: {},
        filters: {
          userId: this.$store.state.member.member_id,
          page:1,
          size: 20,
        },
        filterDateType: false,
      }
    },
    methods: {
    },

    mounted() {
      this.bindGet(getMemberOperatorLogs, 'tableData', {
        action: 'getGrid',
        sendingData: 'filters'
      })
      this.getAll()

    }
  }
</script>

<style lang="scss" scoped>
</style>
